<template>
    <div>
        <el-table
            :data="selectList"
            border
            style="width: 100%">
            <el-table-column
            prop="name"
            label="题目"
            width="180">
            </el-table-column>
            <el-table-column
            prop="answer"
            label="正确答案"
            width="180">
            </el-table-column>
            <el-table-column
            prop="analyse"
            label="解析">
            </el-table-column>
        </el-table>
        
    </div>
</template>

<script>
import paperApi from '@/api/paperApi';
export default {
    asyncData({params}){
        return {
            uid:params.id,
        }

    },

    data(){
        return{
            selectList:null,
            total:null,//总数量
            currentPage:  1,//当前页
            pageSize: 8,//每页大小
        }
    },

    created(){
        this.getWrong()
    },

    methods: {
        getWrong(){
            paperApi.getWrongBook(this.uid,this.currentPage,this.pageSize).then(response =>{
                this.selectList = response.data.data.items
            })
        }
    }
}
</script>
